﻿using System;

namespace Lucid.ESA.ClientDataSystem.Data.Common
{
    /// <summary>
    /// Interface for the TransactionProvider.
    /// </summary>
    public interface ITransactionProvider : IDisposable
    {
        /// <summary>
        /// Begins a Transaction in the current Session in the current HttpContext (current request).
        /// </summary>
        void BeginTransaction();

        /// <summary>
        /// Commits the Transaction in the current Session in the current HttpContext (current request).
        /// </summary>
        void CommitTransaction();

        /// <summary>
        /// Rolls back the Transaction in the current Session in the current HttpContext (current request).
        /// </summary>
        void RollbackTransaction();
    }
}
